-
Notifications
You must be signed in to change notification settings - Fork 7
refactor: kernel-store into smaller units #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| it('returns the index of the first key greater than the search key', () => { | ||
| const arr = ['a', 'c', 'e', 'g', 'i']; | ||
| expect(keySearch(arr, 'b')).toBe(1); | ||
| expect(keySearch(arr, 'd')).toBe(1); | ||
| expect(keySearch(arr, 'f')).toBe(-1); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right.
| it('returns the index of the first key greater than the search key', () => { | |
| const arr = ['a', 'c', 'e', 'g', 'i']; | |
| expect(keySearch(arr, 'b')).toBe(1); | |
| expect(keySearch(arr, 'd')).toBe(1); | |
| expect(keySearch(arr, 'f')).toBe(-1); | |
| }); | |
| it('returns the index of the first key greater than the search key', () => { | |
| const arr = ['a', 'c', 'e', 'g', 'i']; | |
| expect(keySearch(arr, 'b')).toBe(1); | |
| expect(keySearch(arr, 'd')).toBe(2); | |
| expect(keySearch(arr, 'z')).toBe(-1); | |
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I fixed the algorithm 3955435
d0140df to
3955435
Compare
grypez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #454
Refactor the kernel store by breaking the current big file into smaller, easier-to-manage pieces.
Also added lots of missing unit tests.